package com.cwd.arm.common.util;

import java.util.Random;

/**
 * Created by yan on 22-1-1.
 */
public class RandomUtil {

    private static final String BASIC = "123456789qwertyuiopasdfghjklzxcvbnm";

    public static String random(int length){
        char[] basicArray = BASIC.toCharArray();
        Random random = new Random();
        char[] result = new char[length];
        for (int i = 0; i < length; i++) {
            int index = random.nextInt(100) % (basicArray.length);
            result[i] = basicArray[index];
        }
        return new String(result);
    }
}
